-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: expose secret manager rotation config #2530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: expose secret manager rotation config #2530
Conversation
Summary of ChangesHello @ggprod, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the configuration capabilities for the Secret Manager add-on in GKE clusters. By transitioning from a simple boolean flag to a structured object, users gain fine-grained control over the add-on's behavior, most notably the ability to configure secret rotation directly through the cluster's Terraform variables. This change improves the flexibility and security posture of secret management within the GKE environment. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request exposes the rotation configuration for the Secret Manager add-on by replacing the enable_secret_manager_addon boolean variable with a more flexible secret_manager_addon object. This is a great improvement for configurability.
My main feedback is to make the rotation_interval attribute within the rotation_config object optional. According to the provider documentation, this attribute is not required. Making it optional in the variable definition will improve the module's usability. I've added specific suggestions to all affected files (variables.tf, metadata.yaml, and README.md files).
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new feature to configure the Secret Manager add-on's rotation settings. The changes are consistently applied across all relevant modules. My review includes suggestions to improve code robustness by handling empty string inputs for rotation_interval and to enhance code style consistency by applying standard Terraform formatting to variable blocks and YAML files. These changes will improve the maintainability and reliability of the module.
apeabody
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @ggprod!
From the linter (there are several):
terraform_validate ./examples/simple_regional_private
╷
│ Error: Unsupported argument
│
│ on main.tf line 50, in module "gke":
│ 50: enable_secret_manager_addon = true
│
│ An argument named "enable_secret_manager_addon" is not expected here.
╵
…ew object variable
OK, I believe I updated accordingly |
|
/gcbrun |
|
For Gemini's formatting comments it is autogenerated code.. the code in the autogen folder seems correct. Also running Should I fix according to the |
apeabody
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ggprod!
Potential implementation for #2528